-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [Story Preview] Remove Android poster image from playing videos in preview mode #38291
🐛 [Story Preview] Remove Android poster image from playing videos in preview mode #38291
Conversation
…ogic; revert related test changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test on Android if this makes the background flash between the placeholder and the video frames? There are some examples on #31358 of this behavior. As long as it doesn't make the issue worse, it should be fine.
Tested loading a story in the visible state on Android. On this PR vs at main, I don't see any background flash between the grey city placeholder image and the subsequent video frames. This PR: screen-20220621-131550_2.mp4Main: screen-20220621-131811_2.mp4 |
Did you try 1) no workaround on 2) a throttled network? We might not need the workaround anymore. |
When I comment out the |
Warning: disparity between this PR Percy build and its The Percy build for this PR was approved (either manually by a member of the AMP team, or automatically if there were no visual diffs). However, during a continuous integration step we generated another Percy build using the commit on the This is possibly an indication of an issue with this pull request, but could also be the result of flakiness. Please inspect the two builds < This PR's Percy build /
|
PREVIEW
visibility state #37129Background: Android sometimes shows a blank frame between the poster and the first frame, which is an issue that was resolved by rendering the poster image while the first frame buffers.
Issue: Although the poster image is removed once the video is loaded, this removal occurs in
firstLayoutCompleted()
, which is only called oncelayoutCallback()
has resolved. The issue is thatlayoutCallback()
cannot resolve in thepreview
state because of a blockingwhenFirstVisible()
call that resolves only once the document progresses to thevisible
state.Fix: This PR removes the poster image in
onVideoLoaded_()
(which is already being called from thelayoutCallback()
), instead of removing it only after the entirelayoutCallback()
has resolved (i.e., viafirstLayoutCompleted()
).